package com.gec.auction.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName auction
 */
public class Auction implements Serializable {
    /**
     * 
     */
    private Integer auctionid;

    /**
     * 
     */
    private String auctionname;

    /**
     * 
     */
    private BigDecimal auctionstartprice;

    /**
     * 
     */
    private BigDecimal auctionupset;

    /**
     * 
     */
    private Date auctionstarttime;

    /**
     * 
     */
    private Date auctionendtime;

    /**
     * 
     */
    private String auctionpic;

    /**
     * 
     */
    private String auctionpictype;

    /**
     * 
     */
    private String auctiondesc;

    private static final long serialVersionUID = 1L;

    private List<Auctionrecord> auctionList;  //竞拍记录数据
    public List<Auctionrecord> getAuctionList() {
        return auctionList;
    }
    public void setAuctionList(List<Auctionrecord> auctionList) {
        this.auctionList = auctionList;
    }

    /**
     * 
     */
    public Integer getAuctionid() {
        return auctionid;
    }

    /**
     * 
     */
    public void setAuctionid(Integer auctionid) {
        this.auctionid = auctionid;
    }

    /**
     * 
     */
    public String getAuctionname() {
        return auctionname;
    }

    /**
     * 
     */
    public void setAuctionname(String auctionname) {
        this.auctionname = auctionname;
    }

    /**
     * 
     */
    public BigDecimal getAuctionstartprice() {
        return auctionstartprice;
    }

    /**
     * 
     */
    public void setAuctionstartprice(BigDecimal auctionstartprice) {
        this.auctionstartprice = auctionstartprice;
    }

    /**
     * 
     */
    public BigDecimal getAuctionupset() {
        return auctionupset;
    }

    /**
     * 
     */
    public void setAuctionupset(BigDecimal auctionupset) {
        this.auctionupset = auctionupset;
    }

    /**
     * 
     */
    public Date getAuctionstarttime() {
        return auctionstarttime;
    }

    /**
     * 
     */
    public void setAuctionstarttime(Date auctionstarttime) {
        this.auctionstarttime = auctionstarttime;
    }

    /**
     * 
     */
    public Date getAuctionendtime() {
        return auctionendtime;
    }

    /**
     * 
     */
    public void setAuctionendtime(Date auctionendtime) {
        this.auctionendtime = auctionendtime;
    }

    /**
     * 
     */
    public String getAuctionpic() {
        return auctionpic;
    }

    /**
     * 
     */
    public void setAuctionpic(String auctionpic) {
        this.auctionpic = auctionpic;
    }

    /**
     * 
     */
    public String getAuctionpictype() {
        return auctionpictype;
    }

    /**
     * 
     */
    public void setAuctionpictype(String auctionpictype) {
        this.auctionpictype = auctionpictype;
    }

    /**
     * 
     */
    public String getAuctiondesc() {
        return auctiondesc;
    }

    /**
     * 
     */
    public void setAuctiondesc(String auctiondesc) {
        this.auctiondesc = auctiondesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Auction other = (Auction) that;
        return (this.getAuctionid() == null ? other.getAuctionid() == null : this.getAuctionid().equals(other.getAuctionid()))
            && (this.getAuctionname() == null ? other.getAuctionname() == null : this.getAuctionname().equals(other.getAuctionname()))
            && (this.getAuctionstartprice() == null ? other.getAuctionstartprice() == null : this.getAuctionstartprice().equals(other.getAuctionstartprice()))
            && (this.getAuctionupset() == null ? other.getAuctionupset() == null : this.getAuctionupset().equals(other.getAuctionupset()))
            && (this.getAuctionstarttime() == null ? other.getAuctionstarttime() == null : this.getAuctionstarttime().equals(other.getAuctionstarttime()))
            && (this.getAuctionendtime() == null ? other.getAuctionendtime() == null : this.getAuctionendtime().equals(other.getAuctionendtime()))
            && (this.getAuctionpic() == null ? other.getAuctionpic() == null : this.getAuctionpic().equals(other.getAuctionpic()))
            && (this.getAuctionpictype() == null ? other.getAuctionpictype() == null : this.getAuctionpictype().equals(other.getAuctionpictype()))
            && (this.getAuctiondesc() == null ? other.getAuctiondesc() == null : this.getAuctiondesc().equals(other.getAuctiondesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAuctionid() == null) ? 0 : getAuctionid().hashCode());
        result = prime * result + ((getAuctionname() == null) ? 0 : getAuctionname().hashCode());
        result = prime * result + ((getAuctionstartprice() == null) ? 0 : getAuctionstartprice().hashCode());
        result = prime * result + ((getAuctionupset() == null) ? 0 : getAuctionupset().hashCode());
        result = prime * result + ((getAuctionstarttime() == null) ? 0 : getAuctionstarttime().hashCode());
        result = prime * result + ((getAuctionendtime() == null) ? 0 : getAuctionendtime().hashCode());
        result = prime * result + ((getAuctionpic() == null) ? 0 : getAuctionpic().hashCode());
        result = prime * result + ((getAuctionpictype() == null) ? 0 : getAuctionpictype().hashCode());
        result = prime * result + ((getAuctiondesc() == null) ? 0 : getAuctiondesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", auctionid=").append(auctionid);
        sb.append(", auctionname=").append(auctionname);
        sb.append(", auctionstartprice=").append(auctionstartprice);
        sb.append(", auctionupset=").append(auctionupset);
        sb.append(", auctionstarttime=").append(auctionstarttime);
        sb.append(", auctionendtime=").append(auctionendtime);
        sb.append(", auctionpic=").append(auctionpic);
        sb.append(", auctionpictype=").append(auctionpictype);
        sb.append(", auctiondesc=").append(auctiondesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}